home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume7 / nethack3 / patch7k < prev    next >
Encoding:
Internet Message Format  |  1990-02-26  |  58.1 KB

  1. Path: uunet!zephyr.ens.tek.com!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v09i011:  NetHack3 -  display oriented dungeons & dragons (Ver. 3.0), Patch7k
  5. Message-ID: <5225@tekred.CNA.TEK.COM>
  6. Date: 24 Feb 90 00:36:42 GMT
  7. Sender: news@tekred.CNA.TEK.COM
  8. Lines: 2137
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: Izchak Miller <izchak@linc.cis.upenn.edu>
  12. Posting-number: Volume 9, Issue 11
  13. Archive-name: NetHack3/Patch7k
  14. Patch-To: NetHack3: Volume 7, Issue 56-93
  15.  
  16.  
  17.  
  18. #! /bin/sh
  19. # This is a shell archive.  Remove anything before this line, then unpack
  20. # it by saving it into a file and typing "sh file".  To overwrite existing
  21. # files, type "sh file -c".  You can also feed this as standard input via
  22. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  23. # will see the following message at the end:
  24. #        "End of archive 11 (of 30)."
  25. # Contents:  patch7.08
  26. # Wrapped by billr@saab on Wed Feb 21 10:04:32 1990
  27. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  28. if test -f 'patch7.08' -a "${1}" != "-c" ; then 
  29.   echo shar: Renaming existing file \"'patch7.08'\" to \"'patch7.08.orig'\"
  30.   mv -f 'patch7.08' 'patch7.08.orig'
  31. fi
  32. echo shar: Extracting \"'patch7.08'\" \(55436 characters\)
  33. sed "s/^X//" >'patch7.08' <<'END_OF_FILE'
  34. X*** src/Old/shk.c    Mon Feb 19 18:58:28 1990
  35. X--- src/shk.c    Sun Feb 18 11:46:50 1990
  36. X***************
  37. X*** 1,9 ****
  38. X! /*    SCCS Id: @(#)shk.c    3.0    89/11/15
  39. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  40. X  /* NetHack may be freely redistributed.  See license for details. */
  41. X  
  42. X  /* block some unused #defines to avoid overloading some cpp's */
  43. X- #define MONATTK_H
  44. X  #include "hack.h"
  45. X  
  46. X  #include "eshk.h"
  47. X--- 1,9 ----
  48. X! /*    SCCS Id: @(#)shk.c    3.0    89/11/27
  49. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  50. X  /* NetHack may be freely redistributed.  See license for details. */
  51. X  
  52. X+ #define MONATTK_H    /* comment line for pre-compiled headers */
  53. X  /* block some unused #defines to avoid overloading some cpp's */
  54. X  #include "hack.h"
  55. X  
  56. X  #include "eshk.h"
  57. X***************
  58. X*** 10,16 ****
  59. X  
  60. X  #ifdef KOPS
  61. X  static int FDECL(makekops, (coord *));
  62. X! static void kops_gone();
  63. X  #endif /* KOPS */
  64. X  
  65. X  #define    NOTANGRY(mon)    mon->mpeaceful
  66. X--- 10,16 ----
  67. X  
  68. X  #ifdef KOPS
  69. X  static int FDECL(makekops, (coord *));
  70. X! static void NDECL(kops_gone);
  71. X  #endif /* KOPS */
  72. X  
  73. X  #define    NOTANGRY(mon)    mon->mpeaceful
  74. X***************
  75. X*** 18,34 ****
  76. X  
  77. X  /* Descriptor of current shopkeeper. Note that the bill need not be
  78. X     per-shopkeeper, since it is valid only when in a shop. */
  79. X! static struct monst *shopkeeper = 0;
  80. X! static struct bill_x *bill;
  81. X! static int shlevel = 0;    /* level of this shopkeeper */
  82. X  /* struct obj *billobjs;    /* objects on bill with bp->useup */
  83. X                  /* only accessed here and by save & restore */
  84. X! static long int total;        /* filled by addupbill() */
  85. X! static long int followmsg;    /* last time of follow message */
  86. X  static void setpaid(), FDECL(findshk, (int));
  87. X  static int FDECL(dopayobj, (struct bill_x *)), FDECL(getprice, (struct obj *));
  88. X  static struct obj *FDECL(bp_to_obj, (struct bill_x *));
  89. X  
  90. X  /*
  91. X      invariants: obj->unpaid iff onbill(obj) [unless bp->useup]
  92. X          obj->quan <= bp->bquan
  93. X--- 18,37 ----
  94. X  
  95. X  /* Descriptor of current shopkeeper. Note that the bill need not be
  96. X     per-shopkeeper, since it is valid only when in a shop. */
  97. X! VSTATIC struct monst *shopkeeper;
  98. X! VSTATIC struct bill_x *bill;
  99. X! VSTATIC int shlevel;        /* level of this shopkeeper */
  100. X  /* struct obj *billobjs;    /* objects on bill with bp->useup */
  101. X                  /* only accessed here and by save & restore */
  102. X! VSTATIC long int total;     /* filled by addupbill() */
  103. X! VSTATIC long int followmsg;    /* last time of follow message */
  104. X! 
  105. X  static void setpaid(), FDECL(findshk, (int));
  106. X  static int FDECL(dopayobj, (struct bill_x *)), FDECL(getprice, (struct obj *));
  107. X  static struct obj *FDECL(bp_to_obj, (struct bill_x *));
  108. X  
  109. X+ #ifdef OVLB
  110. X+ 
  111. X  /*
  112. X      invariants: obj->unpaid iff onbill(obj) [unless bp->useup]
  113. X          obj->quan <= bp->bquan
  114. X***************
  115. X*** 106,111 ****
  116. X--- 109,117 ----
  117. X      }
  118. X  }
  119. X  
  120. X+ #endif /* OVLB */
  121. X+ #ifdef OVL2
  122. X+ 
  123. X  int
  124. X  inshop() {
  125. X      register int roomno = inroom(u.ux,u.uy);
  126. X***************
  127. X*** 252,257 ****
  128. X--- 258,268 ----
  129. X              NOTANGRY(shopkeeper) = 1;
  130. X          }
  131. X          if(!ESHK(shopkeeper)->following && inhishop(shopkeeper)) {
  132. X+             if(Invis) {
  133. X+             pline("%s senses your presence.", shkname(shopkeeper));
  134. X+             verbalize("Invisible customers are not welcome!");
  135. X+             }
  136. X+             else
  137. X              if(ANGRY(shopkeeper))
  138. X              pline("\"So, %s, you dare return to %s's %s?!\"",
  139. X                  plname,
  140. X***************
  141. X*** 267,276 ****
  142. X                  ESHK(shopkeeper)->visitct++ ? " again" : "",
  143. X                  shkname(shopkeeper),
  144. X                  shtypes[rt - SHOPBASE].name);
  145. X!             if(carrying(PICK_AXE) != (struct obj *)0) {
  146. X!             pline(NOTANGRY(shopkeeper) ?
  147. X!                "\"Will you please leave your pick-axe outside?\"" :
  148. X!                "\"Leave the pick-axe outside.\"");
  149. X              if(dochug(shopkeeper)) {
  150. X                  u.uinshop = 0;    /* he died moving */
  151. X                  return(0);
  152. X--- 278,287 ----
  153. X                  ESHK(shopkeeper)->visitct++ ? " again" : "",
  154. X                  shkname(shopkeeper),
  155. X                  shtypes[rt - SHOPBASE].name);
  156. X!             if(carrying(PICK_AXE) != (struct obj *)0 && !Invis) {
  157. X!             verbalize(NOTANGRY(shopkeeper) ?
  158. X!                "Will you please leave your pick-axe outside?" :
  159. X!                "Leave the pick-axe outside.");
  160. X              if(dochug(shopkeeper)) {
  161. X                  u.uinshop = 0;    /* he died moving */
  162. X                  return(0);
  163. X***************
  164. X*** 283,288 ****
  165. X--- 294,302 ----
  166. X      return (int)u.uinshop;
  167. X  }
  168. X  
  169. X+ #endif /* OVL2 */
  170. X+ #ifdef OVLB
  171. X+ 
  172. X  int
  173. X  inhishop(mtmp)
  174. X  register struct monst *mtmp;
  175. X***************
  176. X*** 597,606 ****
  177. X  #endif /* MSDOS /**/
  178. X          }
  179. X      }
  180. X!     pline("\"Thank you for shopping in %s's %s!\"",
  181. X          shkname(shopkeeper),
  182. X          shtypes[rooms[ESHK(shopkeeper)->shoproom].rtype - SHOPBASE].name);
  183. X-     NOTANGRY(shopkeeper) = 1;
  184. X      return(1);
  185. X  }
  186. X  
  187. X--- 611,620 ----
  188. X  #endif /* MSDOS /**/
  189. X          }
  190. X      }
  191. X!     if(!ANGRY(shopkeeper))
  192. X!         pline("\"Thank you for shopping in %s's %s!\"",
  193. X          shkname(shopkeeper),
  194. X          shtypes[rooms[ESHK(shopkeeper)->shoproom].rtype - SHOPBASE].name);
  195. X      return(1);
  196. X  }
  197. X  
  198. X***************
  199. X*** 790,798 ****
  200. X      if (ACURR(A_CHA) > 18)        tmp /= 2L;
  201. X      else if (ACURR(A_CHA) > 17)    tmp = (tmp * 2L)/3L;
  202. X      else if (ACURR(A_CHA) > 15)    tmp = (tmp * 3L)/4L;
  203. X-     else if (ACURR(A_CHA) < 11)    tmp = (tmp * 4L)/3L;
  204. X-     else if (ACURR(A_CHA) < 8)    tmp = (tmp * 3L)/2L;
  205. X      else if (ACURR(A_CHA) < 6)    tmp *= 2L;
  206. X      return(tmp);
  207. X  }
  208. X  
  209. X--- 804,813 ----
  210. X      if (ACURR(A_CHA) > 18)        tmp /= 2L;
  211. X      else if (ACURR(A_CHA) > 17)    tmp = (tmp * 2L)/3L;
  212. X      else if (ACURR(A_CHA) > 15)    tmp = (tmp * 3L)/4L;
  213. X      else if (ACURR(A_CHA) < 6)    tmp *= 2L;
  214. X+     else if (ACURR(A_CHA) < 8)    tmp = (tmp * 3L)/2L;
  215. X+     else if (ACURR(A_CHA) < 11)    tmp = (tmp * 4L)/3L;
  216. X+     if (!tmp) return 1;
  217. X      return(tmp);
  218. X  }
  219. X  
  220. X***************
  221. X*** 940,956 ****
  222. X          return;
  223. X      }
  224. X      /* you dropped something of your own - probably want to sell it */
  225. X!     if(shopkeeper->msleep || shopkeeper->mfroz || !inhishop(shopkeeper))
  226. X          return;
  227. X      ltmp = (long) getprice(obj) * (long) obj->quan;
  228. X-     if(ESHK(shopkeeper)->billct == BILLSZ
  229. X-        || !saleable(rooms[ESHK(shopkeeper)->shoproom].rtype-SHOPBASE, obj)
  230. X-        || obj->olet == BALL_SYM || ltmp == 0L
  231. X-        || (obj->olet == FOOD_SYM && obj->oeaten)) {
  232. X-         pline("%s seems not interested.", Monnam(shopkeeper));
  233. X-         obj->no_charge = 1;
  234. X-         return;
  235. X-     }
  236. X      if (ANGRY(shopkeeper) || (pl_character[0] == 'T' && u.ulevel < (MAXULEV/2))
  237. X  #ifdef SHIRT
  238. X          || (uarmu && !uarm) /* wearing just a Hawaiian shirt */
  239. X--- 955,963 ----
  240. X          return;
  241. X      }
  242. X      /* you dropped something of your own - probably want to sell it */
  243. X!     if(shopkeeper->msleep || !shopkeeper->mcanmove || !inhishop(shopkeeper))
  244. X          return;
  245. X      ltmp = (long) getprice(obj) * (long) obj->quan;
  246. X      if (ANGRY(shopkeeper) || (pl_character[0] == 'T' && u.ulevel < (MAXULEV/2))
  247. X  #ifdef SHIRT
  248. X          || (uarmu && !uarm) /* wearing just a Hawaiian shirt */
  249. X***************
  250. X*** 959,968 ****
  251. X          ltmp /= 3L;
  252. X          NOTANGRY(shopkeeper) = 1;
  253. X      } else    ltmp /= 2L;
  254. X      if(ESHK(shopkeeper)->robbed) {
  255. X          if((ESHK(shopkeeper)->robbed -= ltmp) < 0L)
  256. X              ESHK(shopkeeper)->robbed = 0L;
  257. X! pline("\"Thank you for your contribution to restock this recently plundered shop.\"");
  258. X          return;
  259. X      }
  260. X      if(ltmp > shopkeeper->mgold)
  261. X--- 966,983 ----
  262. X          ltmp /= 3L;
  263. X          NOTANGRY(shopkeeper) = 1;
  264. X      } else    ltmp /= 2L;
  265. X+     if(ESHK(shopkeeper)->billct == BILLSZ
  266. X+        || !saleable(rooms[ESHK(shopkeeper)->shoproom].rtype-SHOPBASE, obj)
  267. X+        || obj->olet == BALL_SYM || ltmp == 0L
  268. X+        || (obj->olet == FOOD_SYM && obj->oeaten)) {
  269. X+         pline("%s seems not interested.", Monnam(shopkeeper));
  270. X+         obj->no_charge = 1;
  271. X+         return;
  272. X+     }
  273. X      if(ESHK(shopkeeper)->robbed) {
  274. X          if((ESHK(shopkeeper)->robbed -= ltmp) < 0L)
  275. X              ESHK(shopkeeper)->robbed = 0L;
  276. X! verbalize("Thank you for your contribution to restock this recently plundered shop.");
  277. X          return;
  278. X      }
  279. X      if(ltmp > shopkeeper->mgold)
  280. X***************
  281. X*** 983,989 ****
  282. X--- 998,1009 ----
  283. X  {
  284. X      register struct bill_x *bp;
  285. X      register struct obj *obj;
  286. X+ #ifdef __GNULINT__
  287. X+     long totused, thisused = 0L;
  288. X+ /* possibly a bug in the GCC; clearly thisused is always set before use */
  289. X+ #else
  290. X      long totused, thisused;
  291. X+ #endif
  292. X      char buf[BUFSZ];
  293. X  
  294. X      if(mode == 0) {
  295. X***************
  296. X*** 1058,1064 ****
  297. X      case FOOD_SYM:
  298. X          /* simpler hunger check, (2-4)*cost */
  299. X          if (u.uhs >= HUNGRY) tmp *= u.uhs;
  300. X!         if (obj->oeaten) tmp /= 2;        /* partly eaten */
  301. X          break;
  302. X      case WAND_SYM:
  303. X          if (obj->spe == -1) tmp = 0;
  304. X--- 1078,1084 ----
  305. X      case FOOD_SYM:
  306. X          /* simpler hunger check, (2-4)*cost */
  307. X          if (u.uhs >= HUNGRY) tmp *= u.uhs;
  308. X!         if (obj->oeaten) tmp = eaten_stat(tmp, obj); /* partly eaten */
  309. X          break;
  310. X      case WAND_SYM:
  311. X          if (obj->spe == -1) tmp = 0;
  312. X***************
  313. X*** 1085,1091 ****
  314. X      register struct monst *shkp = shopkeeper;
  315. X  
  316. X      if(obj->otyp != PICK_AXE) return(0);
  317. X!     if(u.uinshop && shkp && !shkp->mfroz && !shkp->msleep &&
  318. X          inroom(u.ux+u.dx, u.uy+u.dy) + 1 == u.uinshop &&
  319. X          shkp->mx == ESHK(shkp)->shk.x && shkp->my == ESHK(shkp)->shk.y &&
  320. X          u.ux == ESHK(shkp)->shd.x && u.uy == ESHK(shkp)->shd.y) {
  321. X--- 1105,1111 ----
  322. X      register struct monst *shkp = shopkeeper;
  323. X  
  324. X      if(obj->otyp != PICK_AXE) return(0);
  325. X!     if(u.uinshop && shkp && shkp->mcanmove && !shkp->msleep &&
  326. X          inroom(u.ux+u.dx, u.uy+u.dy) + 1 == u.uinshop &&
  327. X          shkp->mx == ESHK(shkp)->shk.x && shkp->my == ESHK(shkp)->shk.y &&
  328. X          u.ux == ESHK(shkp)->shd.x && u.uy == ESHK(shkp)->shd.y) {
  329. X***************
  330. X*** 1110,1116 ****
  331. X      register schar appr;
  332. X      int z;
  333. X      schar shkroom;
  334. X!     boolean uondoor, satdoor, avoid, badinv;
  335. X  
  336. X      omx = shkp->mx;
  337. X      omy = shkp->my;
  338. X--- 1130,1136 ----
  339. X      register schar appr;
  340. X      int z;
  341. X      schar shkroom;
  342. X!     boolean uondoor = FALSE, satdoor, avoid = FALSE, badinv;
  343. X  
  344. X      omx = shkp->mx;
  345. X      omy = shkp->my;
  346. X***************
  347. X*** 1207,1212 ****
  348. X--- 1227,1235 ----
  349. X      return(move_special(shkp,shkroom,appr,uondoor,avoid,omx,omy,gx,gy));
  350. X  }
  351. X  
  352. X+ #endif /* OVLB */
  353. X+ #ifdef OVL0
  354. X+ 
  355. X  int
  356. X  online(x,y)        /*    New version to speed things up.
  357. X               *    Compiler dependant, may not always work.
  358. X***************
  359. X*** 1222,1227 ****
  360. X--- 1245,1253 ----
  361. X   *}
  362. X   */
  363. X  
  364. X+ #endif /* OVL0 */
  365. X+ #ifdef OVLB
  366. X+ 
  367. X  /* for use in levl_follower (mondata.c) */
  368. X  boolean
  369. X  is_fshk(mtmp)
  370. X***************
  371. X*** 1249,1259 ****
  372. X          pline("\"%s, do not damage the floor here!\"",
  373. X              flags.female ? "Madam" : "Sir");
  374. X      if (pl_character[0] == 'K') adjalign(-sgn(u.ualigntyp));
  375. X!     } else if(!um_dist(shopkeeper->mx, shopkeeper->my, 5) &&
  376. X!           !shopkeeper->msleep && !shopkeeper->mfroz) {
  377. X!     register struct obj *obj, *obj2;
  378. X  
  379. X!     if(dist(shopkeeper->mx, shopkeeper->my) > 2) {
  380. X          mnexto(shopkeeper);
  381. X          /* for some reason he can't come next to you */
  382. X          if(dist(shopkeeper->mx, shopkeeper->my) > 2) {
  383. X--- 1275,1287 ----
  384. X          pline("\"%s, do not damage the floor here!\"",
  385. X              flags.female ? "Madam" : "Sir");
  386. X      if (pl_character[0] == 'K') adjalign(-sgn(u.ualigntyp));
  387. X!     } else 
  388. X!     if(!um_dist(shopkeeper->mx, shopkeeper->my, 5) &&
  389. X!           !shopkeeper->msleep && shopkeeper->mcanmove &&
  390. X!           (ESHK(shopkeeper)->billct || ESHK(shopkeeper)->debit)) {
  391. X!         register struct obj *obj, *obj2;
  392. X  
  393. X!         if(dist(shopkeeper->mx, shopkeeper->my) > 2) {
  394. X          mnexto(shopkeeper);
  395. X          /* for some reason he can't come next to you */
  396. X          if(dist(shopkeeper->mx, shopkeeper->my) > 2) {
  397. X***************
  398. X*** 1263,1278 ****
  399. X              return;
  400. X          } else pline("%s leaps, and grabs your backpack!",
  401. X                      shkname(shopkeeper));
  402. X!     } else pline("%s grabs your backpack!", shkname(shopkeeper));
  403. X  
  404. X!     for(obj = invent; obj; obj = obj2) {
  405. X          obj2 = obj->nobj;
  406. X          if(obj->owornmask) continue;
  407. X          freeinv(obj);
  408. X          obj->nobj = shopkeeper->minvent;
  409. X          shopkeeper->minvent = obj;
  410. X          subfrombill(obj);
  411. X!     }
  412. X      }
  413. X  }
  414. X  
  415. X--- 1291,1309 ----
  416. X              return;
  417. X          } else pline("%s leaps, and grabs your backpack!",
  418. X                      shkname(shopkeeper));
  419. X!         } else pline("%s grabs your backpack!", shkname(shopkeeper));
  420. X  
  421. X!         for(obj = invent; obj; obj = obj2) {
  422. X          obj2 = obj->nobj;
  423. X          if(obj->owornmask) continue;
  424. X+ #ifdef WALKIES
  425. X+         if(obj->otyp == LEASH && obj->leashmon) continue;
  426. X+ #endif
  427. X          freeinv(obj);
  428. X          obj->nobj = shopkeeper->minvent;
  429. X          shopkeeper->minvent = obj;
  430. X          subfrombill(obj);
  431. X!         }
  432. X      }
  433. X  }
  434. X  
  435. X***************
  436. X*** 1306,1311 ****
  437. X--- 1337,1345 ----
  438. X  }
  439. X  #endif
  440. X  
  441. X+ #endif /* OVLB */
  442. X+ #ifdef OVL1
  443. X+ 
  444. X  boolean
  445. X  in_shop(x,y)
  446. X  register int x, y;
  447. X***************
  448. X*** 1316,1338 ****
  449. X      return (IS_SHOP(rooms[roomno]));
  450. X  }
  451. X  
  452. X  void
  453. X  pay_for_door(x,y,dmgstr)
  454. X  int x, y;
  455. X! char *dmgstr;
  456. X  {
  457. X      struct monst *mtmp;
  458. X      int roomno = inroom(x, y);
  459. X!     register int damage;
  460. X  
  461. X      /* make sure this function is not used in the wrong place */
  462. X      if(!(IS_DOOR(levl[x][y].typ) && in_shop(x, y))) return;
  463. X  
  464. X!     for(mtmp = fmon; mtmp; mtmp = mtmp->nmon)
  465. X!         if(mtmp->isshk && ESHK(mtmp)->shoproom == roomno
  466. X!                && ESHK(mtmp)->shoplevel == dlevel) {
  467. X!         shopkeeper = mtmp;
  468. X!     }
  469. X  
  470. X      if(!shopkeeper) return;
  471. X  
  472. X--- 1350,1372 ----
  473. X      return (IS_SHOP(rooms[roomno]));
  474. X  }
  475. X  
  476. X+ #endif /* OVL1 */
  477. X+ #ifdef OVLB
  478. X+ 
  479. X  void
  480. X  pay_for_door(x,y,dmgstr)
  481. X  int x, y;
  482. X! const char *dmgstr;
  483. X  {
  484. X      struct monst *mtmp;
  485. X      int roomno = inroom(x, y);
  486. X!     long damage;
  487. X!     boolean uinshp = in_shop(u.ux, u.uy);
  488. X  
  489. X      /* make sure this function is not used in the wrong place */
  490. X      if(!(IS_DOOR(levl[x][y].typ) && in_shop(x, y))) return;
  491. X  
  492. X!     findshk(roomno);
  493. X  
  494. X      if(!shopkeeper) return;
  495. X  
  496. X***************
  497. X*** 1347,1360 ****
  498. X      }
  499. X  
  500. X      /* if he's not in his shop.. */
  501. X!     if(!in_shop(shopkeeper->mx ,shopkeeper->my)) return;
  502. X  
  503. X!     if(in_shop(u.ux, u.uy)) mnexto(shopkeeper);
  504. X!     else {
  505. X          /* if a !shopkeeper shows up at the door, move him */
  506. X          if(MON_AT(x, y) && (mtmp = m_at(x, y)) != shopkeeper) {
  507. X          if(flags.soundok) {
  508. X!             You("hear an angry voice: \"Out of my way, scum!\"");
  509. X              (void) fflush(stdout);
  510. X  #if defined(SYSV) || defined(ULTRIX) || defined(VMS)
  511. X              (void)
  512. X--- 1381,1404 ----
  513. X      }
  514. X  
  515. X      /* if he's not in his shop.. */
  516. X!     if(!in_shop(shopkeeper->mx ,shopkeeper->my)) {
  517. X!         if(!cansee(shopkeeper->mx, shopkeeper->my)) return;
  518. X!         goto gethim;
  519. X!     }
  520. X  
  521. X!     if(uinshp) {
  522. X!         if(um_dist(shopkeeper->mx, shopkeeper->my, 1) &&
  523. X!                !um_dist(shopkeeper->mx, shopkeeper->my, 3)) { 
  524. X!             pline("%s leaps towards you!", shkname(shopkeeper));
  525. X!             mnexto(shopkeeper);
  526. X!         }
  527. X!         if(um_dist(shopkeeper->mx, shopkeeper->my, 1)) goto gethim;
  528. X!     } else {
  529. X          /* if a !shopkeeper shows up at the door, move him */
  530. X          if(MON_AT(x, y) && (mtmp = m_at(x, y)) != shopkeeper) {
  531. X          if(flags.soundok) {
  532. X!             You("hear an angry voice:");
  533. X!             verbalize("Out of my way, scum!");
  534. X              (void) fflush(stdout);
  535. X  #if defined(SYSV) || defined(ULTRIX) || defined(VMS)
  536. X              (void)
  537. X***************
  538. X*** 1372,1403 ****
  539. X          pmon(shopkeeper);
  540. X      }
  541. X  
  542. X!     if(!strcmp(dmgstr, "destroy")) damage = 400;
  543. X!     else damage = (ACURR(A_STR) > 18) ? 400 : 20 * ACURR(A_STR);
  544. X  
  545. X-     if(um_dist(x, y, 1) || u.ugold < (long) damage || !rn2(50)) {
  546. X-         if(um_dist(x, y, 1))
  547. X-             pline("%s shouts: \"Who dared %s my door?\"",
  548. X-                 shkname(shopkeeper), dmgstr);
  549. X-         else pline("\"How dare you %s my door?\"", dmgstr);
  550. X          NOTANGRY(shopkeeper) = 0;
  551. X          ESHK(shopkeeper)->following = 1;
  552. X          return;
  553. X      }
  554. X  
  555. X!     pline("\"Cad!  You did %d zorkmids worth of damage!\"  Pay? ", damage);
  556. X      if(yn() != 'n') {
  557. X!         u.ugold -= (long) damage;
  558. X!         shopkeeper->mgold += (long) damage;
  559. X          flags.botl = 1;
  560. X          pline("Mollified, %s accepts your restitution.",
  561. X              shkname(shopkeeper));
  562. X- 
  563. X          /* move shk back to his home loc */
  564. X          home_shk(shopkeeper);
  565. X          NOTANGRY(shopkeeper) = 1;
  566. X!     }
  567. X!     else {
  568. X          verbalize("Oh, yes!  You'll pay!");
  569. X          ESHK(shopkeeper)->following = 1;
  570. X          NOTANGRY(shopkeeper) = 0;
  571. X--- 1416,1453 ----
  572. X          pmon(shopkeeper);
  573. X      }
  574. X  
  575. X!     if(!strcmp(dmgstr, "destroy")) damage = 400L;
  576. X!     else damage = (long)(ACURR(A_STR) > 18) ? 400 : 20 * ACURR(A_STR);
  577. X! 
  578. X!     if((um_dist(x, y, 1) && !uinshp) || 
  579. X!             (u.ugold + ESHK(shopkeeper)->credit) < damage 
  580. X!                 || !rn2(50)) {
  581. X!         if(um_dist(x, y, 1) && !uinshp) {
  582. X!             pline("%s shouts:", shkname(shopkeeper));
  583. X!             pline("\"Who dared %s my door?\"", dmgstr);
  584. X!         } 
  585. X!         else
  586. X! gethim:
  587. X!             pline("\"How dare you %s my door?\"", dmgstr);
  588. X  
  589. X          NOTANGRY(shopkeeper) = 0;
  590. X          ESHK(shopkeeper)->following = 1;
  591. X          return;
  592. X      }
  593. X  
  594. X!     if(Invis) Your("invisibility does not fool %s!", shkname(shopkeeper));
  595. X!     pline("\"Cad!  You did %ld zorkmids worth of damage!\"  Pay? ", damage);
  596. X      if(yn() != 'n') {
  597. X!         damage = check_credit(damage, shopkeeper);
  598. X!         u.ugold -= damage;
  599. X!         shopkeeper->mgold += damage;
  600. X          flags.botl = 1;
  601. X          pline("Mollified, %s accepts your restitution.",
  602. X              shkname(shopkeeper));
  603. X          /* move shk back to his home loc */
  604. X          home_shk(shopkeeper);
  605. X          NOTANGRY(shopkeeper) = 1;
  606. X!     } else {
  607. X          verbalize("Oh, yes!  You'll pay!");
  608. X          ESHK(shopkeeper)->following = 1;
  609. X          NOTANGRY(shopkeeper) = 0;
  610. X***************
  611. X*** 1466,1473 ****
  612. X            otmp->otyp <= DRUM_OF_EARTHQUAKE) ||      /* 5 - 9 */
  613. X  #endif
  614. X              otmp->olet == WAND_SYM) {         /* 3 - 11 */
  615. X!         if(otmp->spe == 1) tmp += (tmp/3L);
  616. X!         else tmp = (tmp/4L);
  617. X      }
  618. X      else return(0L);
  619. X      return(tmp);
  620. X--- 1516,1522 ----
  621. X            otmp->otyp <= DRUM_OF_EARTHQUAKE) ||      /* 5 - 9 */
  622. X  #endif
  623. X              otmp->olet == WAND_SYM) {         /* 3 - 11 */
  624. X!         if(otmp->spe > 1) tmp = (tmp/4L);
  625. X      }
  626. X      else return(0L);
  627. X      return(tmp);
  628. X***************
  629. X*** 1486,1488 ****
  630. X--- 1535,1603 ----
  631. X          ESHK(shopkeeper)->debit += cost_per_charge(otmp);
  632. X      }
  633. X  }
  634. X+ 
  635. X+ boolean
  636. X+ block_door(x,y)      /* used in domove to block diagonal shop-exit */
  637. X+ register int x, y;
  638. X+ {
  639. X+     register int roomno = inroom(x, y);
  640. X+ 
  641. X+     if(!in_shop(u.ux, u.uy)) return(FALSE);
  642. X+ 
  643. X+     if(!IS_DOOR(levl[x][y].typ)) return(FALSE);
  644. X+ 
  645. X+     if(roomno != inroom(u.ux,u.uy)) return(FALSE);
  646. X+ 
  647. X+     findshk(roomno);
  648. X+ 
  649. X+     if(inhishop(shopkeeper)
  650. X+         && shopkeeper->mx == ESHK(shopkeeper)->shk.x
  651. X+         && shopkeeper->my == ESHK(shopkeeper)->shk.y
  652. X+         /* Actually, the shk should be made to block _any_ */
  653. X+         /* door, including a door the player digs, if the  */
  654. X+         /* shk is within a 'jumping' distance.           */
  655. X+         && ESHK(shopkeeper)->shd.x == x && ESHK(shopkeeper)->shd.y == y
  656. X+         && shopkeeper->mcanmove && !shopkeeper->msleep
  657. X+         && (ESHK(shopkeeper)->debit || ESHK(shopkeeper)->billct ||
  658. X+         ESHK(shopkeeper)->robbed)) {
  659. X+         pline("%s%s blocks your way!", shkname(shopkeeper),
  660. X+                 Invis ? " senses your motion and" : "");
  661. X+         return(TRUE);
  662. X+     }
  663. X+     return(FALSE);
  664. X+ }
  665. X+ 
  666. X+ boolean
  667. X+ block_entry(x,y)      /* used in domove to block diagonal shop-entry */
  668. X+ register int x, y;
  669. X+ {
  670. X+     register int sx, sy, roomno = inroom(x, y);
  671. X+ 
  672. X+     if(roomno != inroom(u.ux,u.uy)) return(FALSE);
  673. X+ 
  674. X+     if(!(in_shop(u.ux, u.uy) && IS_DOOR(levl[u.ux][u.uy].typ) &&
  675. X+         levl[u.ux][u.uy].doormask == D_BROKEN)) return(FALSE);
  676. X+ 
  677. X+     findshk(roomno);
  678. X+     if(!inhishop(shopkeeper)) return(FALSE);
  679. X+ 
  680. X+     if(ESHK(shopkeeper)->shd.x != u.ux || ESHK(shopkeeper)->shd.y != u.uy)
  681. X+         return(FALSE);
  682. X+ 
  683. X+     sx = ESHK(shopkeeper)->shk.x;
  684. X+     sy = ESHK(shopkeeper)->shk.y;
  685. X+ 
  686. X+     if(shopkeeper->mx == sx && shopkeeper->my == sy
  687. X+             && shopkeeper->mcanmove && !shopkeeper->msleep
  688. X+             && in_shop(x, y)
  689. X+             && (x == sx-1 || x == sx+1 || y == sy-1 || y == sy+1)  
  690. X+             && (Invis || carrying(PICK_AXE))
  691. X+           ) {
  692. X+         pline("%s%s blocks your way!", shkname(shopkeeper),
  693. X+                 Invis ? " senses your motion and" : "");
  694. X+         return(TRUE);
  695. X+     }
  696. X+     return(FALSE);
  697. X+ }
  698. X+ 
  699. X+ #endif /* OVLB */
  700. X*** src/Old/shknam.c    Mon Feb 19 18:59:31 1990
  701. X--- src/shknam.c    Sun Feb 11 12:27:44 1990
  702. X***************
  703. X*** 7,12 ****
  704. X--- 7,14 ----
  705. X  #include "hack.h"
  706. X  #include "eshk.h"
  707. X  
  708. X+ #ifdef OVLB
  709. X+ 
  710. X  static const char *shkliquors[] = {
  711. X      /* Ukraine */
  712. X      "Njezjin", "Tsjernigof", "Gomel", "Ossipewsk", "Gorlowka",
  713. X***************
  714. X*** 137,142 ****
  715. X--- 139,145 ----
  716. X   * In the latter case, prepend it with a unary minus so the code can know
  717. X   * (by testing the sign) whether to use mkobj() or mksobj().
  718. X   */
  719. X+ 
  720. X  const struct shclass shtypes[] = {
  721. X      {"general store", RANDOM_SYM,
  722. X  #ifdef SPELLS
  723. X***************
  724. X*** 144,152 ****
  725. X  #else
  726. X          47,
  727. X  #endif
  728. X!         D_SHOP, {{100, RANDOM_SYM}, {0, 0}, {0, 0}}, shkgeneral},
  729. X      {"used armor dealership", ARMOR_SYM, 14,
  730. X!         D_SHOP, {{90, ARMOR_SYM}, {10, WEAPON_SYM}, {0, 0}}, shkarmors},
  731. X      {"second hand bookstore", SCROLL_SYM, 10, D_SHOP,
  732. X  #ifdef SPELLS
  733. X          {{90, SCROLL_SYM}, {10, SPBOOK_SYM}, {0, 0}},
  734. X--- 147,155 ----
  735. X  #else
  736. X          47,
  737. X  #endif
  738. X!         D_SHOP, {{100, RANDOM_SYM}, {0, 0}, {0, 0}}, (char **)shkgeneral},
  739. X      {"used armor dealership", ARMOR_SYM, 14,
  740. X!         D_SHOP, {{90, ARMOR_SYM}, {10, WEAPON_SYM}, {0, 0}}, (char **)shkarmors},
  741. X      {"second hand bookstore", SCROLL_SYM, 10, D_SHOP,
  742. X  #ifdef SPELLS
  743. X          {{90, SCROLL_SYM}, {10, SPBOOK_SYM}, {0, 0}},
  744. X***************
  745. X*** 153,178 ****
  746. X  #else
  747. X          {{100, SCROLL_SYM}, {0, 0}, {0, 0}},
  748. X  #endif
  749. X!         shkbooks},
  750. X      {"liquor emporium", POTION_SYM, 10, D_SHOP,
  751. X!         {{100, POTION_SYM}, {0, 0}, {0, 0}}, shkliquors},
  752. X      {"antique weapons outlet", WEAPON_SYM, 5, D_SHOP,
  753. X!         {{90, WEAPON_SYM}, {10, ARMOR_SYM}, {0, 0}}, shkweapons},
  754. X      {"delicatessen", FOOD_SYM, 5, D_SHOP,
  755. X!         {{95, FOOD_SYM}, {5, POTION_SYM}, {0, 0}}, shkfoods},
  756. X      {"jewelers", RING_SYM, 3, D_SHOP,
  757. X!         {{85, RING_SYM}, {10, GEM_SYM}, {5, AMULET_SYM}, {0, 0}}, shkrings},
  758. X      {"quality apparel and accessories", WAND_SYM, 3, D_SHOP,
  759. X          {{90, WAND_SYM}, {5, -LEATHER_GLOVES}, {5, -ELVEN_CLOAK}, {0, 0}},
  760. X!          shkwands},
  761. X      {"hardware store", TOOL_SYM, 3, D_SHOP,
  762. X!         {{100, TOOL_SYM}, {0, 0}, {0, 0}}, shktools},
  763. X      /* Actually shktools is ignored; the code specifically chooses a
  764. X       * random implementor name (the only shop type with random shopkeepers)
  765. X       */
  766. X  #ifdef SPELLS
  767. X      {"rare books", SPBOOK_SYM, 3, D_SHOP,
  768. X!         {{90, SPBOOK_SYM}, {10, SCROLL_SYM}, {0, 0}}, shkbooks},
  769. X  #endif
  770. X      {NULL, 0, 0, 0, {{0, 0}, {0, 0}, {0, 0}}, (char **)0}
  771. X  };
  772. X--- 156,181 ----
  773. X  #else
  774. X          {{100, SCROLL_SYM}, {0, 0}, {0, 0}},
  775. X  #endif
  776. X!         (char **)shkbooks},
  777. X      {"liquor emporium", POTION_SYM, 10, D_SHOP,
  778. X!         {{100, POTION_SYM}, {0, 0}, {0, 0}}, (char **)shkliquors},
  779. X      {"antique weapons outlet", WEAPON_SYM, 5, D_SHOP,
  780. X!         {{90, WEAPON_SYM}, {10, ARMOR_SYM}, {0, 0}}, (char **)shkweapons},
  781. X      {"delicatessen", FOOD_SYM, 5, D_SHOP,
  782. X!         {{95, FOOD_SYM}, {5, POTION_SYM}, {0, 0}}, (char **)shkfoods},
  783. X      {"jewelers", RING_SYM, 3, D_SHOP,
  784. X!         {{85, RING_SYM}, {10, GEM_SYM}, {5, AMULET_SYM}, {0, 0}}, (char **)shkrings},
  785. X      {"quality apparel and accessories", WAND_SYM, 3, D_SHOP,
  786. X          {{90, WAND_SYM}, {5, -LEATHER_GLOVES}, {5, -ELVEN_CLOAK}, {0, 0}},
  787. X!          (char **)shkwands},
  788. X      {"hardware store", TOOL_SYM, 3, D_SHOP,
  789. X!         {{100, TOOL_SYM}, {0, 0}, {0, 0}}, (char **)shktools},
  790. X      /* Actually shktools is ignored; the code specifically chooses a
  791. X       * random implementor name (the only shop type with random shopkeepers)
  792. X       */
  793. X  #ifdef SPELLS
  794. X      {"rare books", SPBOOK_SYM, 3, D_SHOP,
  795. X!         {{90, SPBOOK_SYM}, {10, SCROLL_SYM}, {0, 0}}, (char **)shkbooks},
  796. X  #endif
  797. X      {NULL, 0, 0, 0, {{0, 0}, {0, 0}, {0, 0}}, (char **)0}
  798. X  };
  799. X***************
  800. X*** 191,197 ****
  801. X                  (mtmp=makemon(ptr,sx,sy))) {
  802. X          mtmp->mimic = 1;
  803. X          /* note: makemon will set the mimic symbol to a shop item */
  804. X!         if (rn2(10) >= dlevel) mtmp->mappearance = S_MIMIC_DEF;
  805. X      } else if ((atype = get_shop_item(shp - shtypes)) < 0)
  806. X          (void) mksobj_at(-atype, sx, sy);
  807. X      else (void) mkobj_at(atype, sx, sy);
  808. X--- 194,203 ----
  809. X                  (mtmp=makemon(ptr,sx,sy))) {
  810. X          mtmp->mimic = 1;
  811. X          /* note: makemon will set the mimic symbol to a shop item */
  812. X!         if (rn2(10) >= dlevel) {
  813. X!             mtmp->m_ap_type = M_AP_OBJECT;
  814. X!             mtmp->mappearance = STRANGE_OBJECT;
  815. X!         }
  816. X      } else if ((atype = get_shop_item(shp - shtypes)) < 0)
  817. X          (void) mksobj_at(-atype, sx, sy);
  818. X      else (void) mkobj_at(atype, sx, sy);
  819. X***************
  820. X*** 208,214 ****
  821. X      for(i = 0; i < dlevel; i++)
  822. X      if (strlen(nlp[i]) == 0) {
  823. X          /* Not enough names, try general name */
  824. X!         if (nlp != shkgeneral)
  825. X          findname(nampt, shkgeneral);
  826. X          else
  827. X          Strcpy(nampt, "Dirk");
  828. X--- 214,220 ----
  829. X      for(i = 0; i < dlevel; i++)
  830. X      if (strlen(nlp[i]) == 0) {
  831. X          /* Not enough names, try general name */
  832. X!         if (nlp != (char **)shkgeneral)
  833. X          findname(nampt, shkgeneral);
  834. X          else
  835. X          Strcpy(nampt, "Dirk");
  836. X***************
  837. X*** 278,284 ****
  838. X      ESHK(shk)->following = 0;
  839. X      ESHK(shk)->billct = 0;
  840. X      shk->mgold = 1000L + 30L*(long)rnd(100);    /* initial capital */
  841. X!     if (shp->shknms == shktools) {
  842. X          static int who;
  843. X          who = rn2(sizeof(shktools)/sizeof(char *) - 1);
  844. X          if (who==21) ESHK(shk)->ismale = FALSE;
  845. X--- 284,290 ----
  846. X      ESHK(shk)->following = 0;
  847. X      ESHK(shk)->billct = 0;
  848. X      shk->mgold = 1000L + 30L*(long)rnd(100);    /* initial capital */
  849. X!     if (shp->shknms == (char **)shktools) {
  850. X          static int who;
  851. X          who = rn2(sizeof(shktools)/sizeof(char *) - 1);
  852. X          if (who==21) ESHK(shk)->ismale = FALSE;
  853. X***************
  854. X*** 296,302 ****
  855. X  void
  856. X  stock_room(shp, sroom)
  857. X  /* stock a newly-created room with artifacts */
  858. X! struct shclass    *shp;
  859. X  register struct mkroom *sroom;
  860. X  {
  861. X      /*
  862. X--- 302,308 ----
  863. X  void
  864. X  stock_room(shp, sroom)
  865. X  /* stock a newly-created room with artifacts */
  866. X! const struct shclass    *shp;
  867. X  register struct mkroom *sroom;
  868. X  {
  869. X      /*
  870. X***************
  871. X*** 306,325 ****
  872. X       * door get artifacts).
  873. X       */
  874. X      register int sx, sy, sh;
  875. X  
  876. X      /* first, try to place a shopkeeper in the room */
  877. X      if ((sh = shkinit(shp, sroom)) < 0)
  878. X      return;
  879. X  
  880. X!     /* make sure no doorways without doors in shops */
  881. X!     for(sx = sroom->lx - 1; sx <= sroom->hx + 1; sx++)
  882. X!     for(sy = sroom->ly - 1; sy <= sroom->hy + 1; sy++) {
  883. X!         if(IS_DOOR(levl[sx][sy].typ))
  884. X!         if (levl[sx][sy].doormask == D_NODOOR) {
  885. X!           levl[sx][sy].doormask = D_ISOPEN;
  886. X!           mnewsym(sx,sy);
  887. X!         }
  888. X      }
  889. X  
  890. X      for(sx = sroom->lx; sx <= sroom->hx; sx++)
  891. X      for(sy = sroom->ly; sy <= sroom->hy; sy++) {
  892. X--- 312,347 ----
  893. X       * door get artifacts).
  894. X       */
  895. X      register int sx, sy, sh;
  896. X+     char buf[BUFSZ];
  897. X  
  898. X      /* first, try to place a shopkeeper in the room */
  899. X      if ((sh = shkinit(shp, sroom)) < 0)
  900. X      return;
  901. X  
  902. X!     /* make sure no doorways without doors, and no */
  903. X!     /* trapped doors, in shops.               */
  904. X!     sx = doors[sroom->fdoor].x;
  905. X!     sy = doors[sroom->fdoor].y;
  906. X! 
  907. X!     if(levl[sx][sy].doormask == D_NODOOR) {
  908. X!         levl[sx][sy].doormask = D_ISOPEN;
  909. X!         mnewsym(sx,sy);
  910. X      }
  911. X+     if(levl[sx][sy].doormask & D_TRAPPED) {    
  912. X+         levl[sx][sy].doormask &= ~D_TRAPPED;
  913. X+         levl[sx][sy].doormask = D_LOCKED;
  914. X+     }
  915. X+ 
  916. X+     if(levl[sx][sy].doormask == D_LOCKED) {
  917. X+         register int m = sx, n = sy;
  918. X+ 
  919. X+         if(IS_ROOM(levl[sx+1][sy].typ)) m--;
  920. X+         else if(IS_ROOM(levl[sx-1][sy].typ)) m++;
  921. X+         if(IS_ROOM(levl[sx][sy+1].typ)) n--;
  922. X+         else if(IS_ROOM(levl[sx][sy-1].typ)) n++;
  923. X+         Sprintf(buf, "Closed for inventory"); 
  924. X+         make_engr_at(m, n, buf); 
  925. X+     }
  926. X  
  927. X      for(sx = sroom->lx; sx <= sroom->hx; sx++)
  928. X      for(sy = sroom->ly; sy <= sroom->hy; sy++) {
  929. X***************
  930. X*** 336,341 ****
  931. X--- 358,366 ----
  932. X       */
  933. X  }
  934. X  
  935. X+ #endif /* OVLB */
  936. X+ #ifdef OVL0
  937. X+ 
  938. X  int
  939. X  saleable(nshop, obj)            /* does "shop" stock this item type */
  940. X  register int nshop;
  941. X***************
  942. X*** 359,365 ****
  943. X  get_shop_item(type)
  944. X  int type;
  945. X  {
  946. X!     struct shclass *shp = shtypes+type;
  947. X      register int i,j;
  948. X  
  949. X      /* select an appropriate artifact type at random */
  950. X--- 384,390 ----
  951. X  get_shop_item(type)
  952. X  int type;
  953. X  {
  954. X!     const struct shclass *shp = shtypes+type;
  955. X      register int i,j;
  956. X  
  957. X      /* select an appropriate artifact type at random */
  958. X***************
  959. X*** 368,370 ****
  960. X--- 393,397 ----
  961. X  
  962. X      return shp->iprobs[i].itype;
  963. X  }
  964. X+ 
  965. X+ #endif /* OVL0 */
  966. X*** src/Old/sit.c    Mon Feb 19 18:59:54 1990
  967. X--- src/sit.c    Mon Jan 15 12:37:51 1990
  968. X***************
  969. X*** 33,39 ****
  970. X          switch (rnd(13))  {
  971. X              case 1:
  972. X              adjattrib(rn2(A_MAX), -rn1(4,3), FALSE);
  973. X!             losehp(rnd(10), "cursed throne");
  974. X              break;
  975. X              case 2:
  976. X              adjattrib(rn2(A_MAX), 1, FALSE);
  977. X--- 33,39 ----
  978. X          switch (rnd(13))  {
  979. X              case 1:
  980. X              adjattrib(rn2(A_MAX), -rn1(4,3), FALSE);
  981. X!             losehp(rnd(10), "cursed throne", KILLED_BY_AN);
  982. X              break;
  983. X              case 2:
  984. X              adjattrib(rn2(A_MAX), 1, FALSE);
  985. X***************
  986. X*** 42,49 ****
  987. X          pline("A%s charge of electricity shoots through your body!",
  988. X                    (Shock_resistance) ? "" : " massive");
  989. X              if(Shock_resistance)
  990. X!                 losehp(rnd(6), "electric chair");
  991. X!             else    losehp(rnd(30), "electric chair");
  992. X              break;
  993. X              case 4:
  994. X              You("feel much, much better!");
  995. X--- 42,49 ----
  996. X          pline("A%s charge of electricity shoots through your body!",
  997. X                    (Shock_resistance) ? "" : " massive");
  998. X              if(Shock_resistance)
  999. X!                 losehp(rnd(6), "electric chair", KILLED_BY_AN);
  1000. X!             else    losehp(rnd(30), "electric chair", KILLED_BY_AN);
  1001. X              break;
  1002. X              case 4:
  1003. X              You("feel much, much better!");
  1004. X***************
  1005. X*** 78,89 ****
  1006. X              case 9:
  1007. X              You("hear a voice echo:");
  1008. X      pline("\"A curse upon thee for sitting upon this most holy throne!\"");
  1009. X!             if (u.uluck > 0)  {
  1010. X                  make_blinded(Blinded + rn1(100,250),TRUE);
  1011. X              } else        rndcurse();
  1012. X              break;
  1013. X              case 10:
  1014. X!             if (u.uluck < 0 || (HSee_invisible & INTRINSIC))  {
  1015. X                  pline("An image forms in your mind.");
  1016. X                  do_mapping();
  1017. X              } else  {
  1018. X--- 78,89 ----
  1019. X              case 9:
  1020. X              You("hear a voice echo:");
  1021. X      pline("\"A curse upon thee for sitting upon this most holy throne!\"");
  1022. X!             if (Luck > 0)  {
  1023. X                  make_blinded(Blinded + rn1(100,250),TRUE);
  1024. X              } else        rndcurse();
  1025. X              break;
  1026. X              case 10:
  1027. X!             if (Luck < 0 || (HSee_invisible & INTRINSIC))  {
  1028. X                  pline("An image forms in your mind.");
  1029. X                  do_mapping();
  1030. X              } else  {
  1031. X***************
  1032. X*** 92,98 ****
  1033. X              }
  1034. X              break;
  1035. X              case 11:
  1036. X!             if (u.uluck < 0)  {
  1037. X                  You("feel threatened.");
  1038. X                  aggravate();
  1039. X              } else  {
  1040. X--- 92,98 ----
  1041. X              }
  1042. X              break;
  1043. X              case 11:
  1044. X!             if (Luck < 0)  {
  1045. X                  You("feel threatened.");
  1046. X                  aggravate();
  1047. X              } else  {
  1048. X***************
  1049. X*** 180,186 ****
  1050. X              HFire_resistance &= ~INTRINSIC;
  1051. X              if (Inhell && !Fire_resistance) {
  1052. X                  You("burn to a crisp.");
  1053. X!                 killer = "gremlin curse";
  1054. X                  done(BURNING);
  1055. X              } else You("feel warmer.");
  1056. X              break;
  1057. X--- 180,187 ----
  1058. X              HFire_resistance &= ~INTRINSIC;
  1059. X              if (Inhell && !Fire_resistance) {
  1060. X                  You("burn to a crisp.");
  1061. X!                 killer_format = NO_KILLER_PREFIX;
  1062. X!                 killer = self_pronoun("a gremlin stole %s fire resistance in hell", "his");
  1063. X                  done(BURNING);
  1064. X              } else You("feel warmer.");
  1065. X              break;
  1066. X*** src/Old/sounds.c    Mon Feb 19 19:00:11 1990
  1067. X--- src/sounds.c    Fri Feb 16 22:11:07 1990
  1068. X***************
  1069. X*** 1,22 ****
  1070. X! /*    SCCS Id: @(#)sounds.c    3.0    88/06/19 */
  1071. X  /* NetHack may be freely redistributed.  See license for details. */
  1072. X  /* Copyright (c) 1989 Janet Walz, Mike Threepoint */
  1073. X  
  1074. X  /* block some unused #defines to avoid overloading some cpp's */
  1075. X  
  1076. X- #define ONAMES_H
  1077. X  #include "hack.h"
  1078. X  #include "edog.h"
  1079. X  
  1080. X  void
  1081. X  verbalize(str)
  1082. X! register char *str;
  1083. X  {
  1084. X      if(flags.soundok) pline("\"%s\"", str);
  1085. X  }
  1086. X  
  1087. X  #ifdef SOUNDS
  1088. X  
  1089. X  void
  1090. X  dosounds()
  1091. X  {
  1092. X--- 1,30 ----
  1093. X! /*    SCCS Id: @(#)sounds.c    3.0    90/02/05 */
  1094. X  /* NetHack may be freely redistributed.  See license for details. */
  1095. X  /* Copyright (c) 1989 Janet Walz, Mike Threepoint */
  1096. X  
  1097. X+ #define ONAMES_H    /* comment line for pre-compiled headers */
  1098. X  /* block some unused #defines to avoid overloading some cpp's */
  1099. X  
  1100. X  #include "hack.h"
  1101. X  #include "edog.h"
  1102. X  
  1103. X+ static int FDECL(domonnoise,(struct monst *));
  1104. X+ 
  1105. X+ #ifdef OVLB
  1106. X+ 
  1107. X  void
  1108. X  verbalize(str)
  1109. X! register const char *str;
  1110. X  {
  1111. X      if(flags.soundok) pline("\"%s\"", str);
  1112. X  }
  1113. X  
  1114. X+ #endif /* OVLB */
  1115. X+ 
  1116. X  #ifdef SOUNDS
  1117. X  
  1118. X+ #ifdef OVL0
  1119. X+ 
  1120. X  void
  1121. X  dosounds()
  1122. X  {
  1123. X***************
  1124. X*** 24,29 ****
  1125. X--- 32,43 ----
  1126. X      register struct mkroom *sroom;
  1127. X      register xchar roomtype;
  1128. X      register int croomno;
  1129. X+     boolean gold_in_vault, u_in_room;
  1130. X+     register int vx, vy;
  1131. X+ 
  1132. X+ #ifdef __GNULINT__
  1133. X+     gold_in_vault = u_in_room = FALSE;
  1134. X+ #endif
  1135. X  
  1136. X      hallu = Hallucination ? 1 : 0;
  1137. X  
  1138. X***************
  1139. X*** 61,79 ****
  1140. X      for (sroom = &rooms[0]; ; sroom++) {    /* find any special room */
  1141. X          if (sroom->hx < 0) break;        /* no more rooms */
  1142. X          if (sroom->rtype != OROOM) {
  1143. X          if (sroom->rtype < SHOPBASE)
  1144. X              roomtype = sroom->rtype;
  1145. X!         else {
  1146. X!             croomno = inroom(u.ux,u.uy);
  1147. X!             if (croomno == -1 || sroom != &rooms[croomno])
  1148. X              /* player not presently in shop */
  1149. X!             /* other special room types disappear when player
  1150. X!                enters */
  1151. X!             roomtype = SHOPBASE;
  1152. X          }
  1153. X          break;
  1154. X          }
  1155. X      }
  1156. X      switch (roomtype) {
  1157. X  #ifdef THRONES
  1158. X          case COURT:
  1159. X--- 75,104 ----
  1160. X      for (sroom = &rooms[0]; ; sroom++) {    /* find any special room */
  1161. X          if (sroom->hx < 0) break;        /* no more rooms */
  1162. X          if (sroom->rtype != OROOM) {
  1163. X+         croomno = inroom(u.ux,u.uy);
  1164. X+         u_in_room = croomno >= 0 && sroom == &rooms[croomno];
  1165. X          if (sroom->rtype < SHOPBASE)
  1166. X              roomtype = sroom->rtype;
  1167. X!         else if (!u_in_room) {
  1168. X              /* player not presently in shop */
  1169. X!             /* NOTE: other special room types disappear when player
  1170. X!                enters (except VAULT) */
  1171. X!             roomtype = SHOPBASE;
  1172. X          }
  1173. X          break;
  1174. X          }
  1175. X      }
  1176. X+ 
  1177. X+     if (roomtype == VAULT) {
  1178. X+         gold_in_vault = FALSE;
  1179. X+         for (vx = sroom->lx; vx <= sroom->hx && !gold_in_vault; vx++)
  1180. X+         for (vy = sroom->ly; vy <= sroom->hy; vy++)
  1181. X+             if (g_at(vx, vy)) {
  1182. X+             gold_in_vault = TRUE;
  1183. X+             break;
  1184. X+             }
  1185. X+     }
  1186. X+ 
  1187. X      switch (roomtype) {
  1188. X  #ifdef THRONES
  1189. X          case COURT:
  1190. X***************
  1191. X*** 108,116 ****
  1192. X          }
  1193. X          break;
  1194. X          case VAULT:
  1195. X!         switch (rn2(2)+hallu) {
  1196. X              case 0:
  1197. X!             You("hear someone counting money.");
  1198. X              break;
  1199. X              case 1:
  1200. X              You("hear the footsteps of a guard on patrol.");
  1201. X--- 133,145 ----
  1202. X          }
  1203. X          break;
  1204. X          case VAULT:
  1205. X!         if(gd_sound())
  1206. X!           switch (rn2(2)+hallu) {
  1207. X              case 0:
  1208. X!             if (gold_in_vault && !u_in_room)
  1209. X!                 You("hear someone counting money.");
  1210. X!             else
  1211. X!                 You("hear someone searching.");
  1212. X              break;
  1213. X              case 1:
  1214. X              You("hear the footsteps of a guard on patrol.");
  1215. X***************
  1216. X*** 198,203 ****
  1217. X--- 227,234 ----
  1218. X      }
  1219. X  }
  1220. X  
  1221. X+ #endif /* OVL0 */
  1222. X+ #ifdef OVLB
  1223. X  
  1224. X  #include "eshk.h"
  1225. X  
  1226. X***************
  1227. X*** 283,290 ****
  1228. X--- 314,345 ----
  1229. X          break;
  1230. X      }
  1231. X  }
  1232. X+ 
  1233. X+ #endif /* OVLB */
  1234. X+ 
  1235. X  #endif /* SOUNDS */
  1236. X  
  1237. X+ #ifdef OVLB
  1238. X+ 
  1239. X+ /* for the connoisseurs ... */
  1240. X+ static const char *Qmen[] = {
  1241. X+     "Max",      /* Born */
  1242. X+     "Wolfgang", /* Pauli */
  1243. X+     "Louis",    /* de Broglie */
  1244. X+     "Erwin",    /* Schroedinger */
  1245. X+     "Werner",   /* Heisenberg */
  1246. X+     "Niels",    /* Bohr */
  1247. X+     "Paul",     /* Dirac */
  1248. X+     "Pascual",  /* Jordan */
  1249. X+     "Dick",     /* Feynman */
  1250. X+     "Sam" }; /* Beckett ("Oh, boy." :-) */
  1251. X+ 
  1252. X+ struct monst *
  1253. X+ qname(mtmp)
  1254. X+ struct monst *mtmp;
  1255. X+ {
  1256. X+     return(christen_monst(mtmp, Qmen[rn2(SIZE(Qmen))]));
  1257. X+ }
  1258. X  
  1259. X  static int
  1260. X  domonnoise(mtmp)
  1261. X***************
  1262. X*** 391,397 ****
  1263. X          kludge("%s moans.", Monnam(mtmp));
  1264. X          else if (mtmp->mconf || mtmp->mstun)
  1265. X          verbalize(!rn2(3) ? "Huh?" : rn2(2) ? "What?" : "Eh?");
  1266. X!         else if (mtmp->mblinded)
  1267. X          verbalize("I can't see!");
  1268. X          else if (mtmp->mtrapped)
  1269. X          verbalize("I'm trapped!");
  1270. X--- 446,452 ----
  1271. X          kludge("%s moans.", Monnam(mtmp));
  1272. X          else if (mtmp->mconf || mtmp->mstun)
  1273. X          verbalize(!rn2(3) ? "Huh?" : rn2(2) ? "What?" : "Eh?");
  1274. X!         else if (!mtmp->mcansee)
  1275. X          verbalize("I can't see!");
  1276. X          else if (mtmp->mtrapped)
  1277. X          verbalize("I'm trapped!");
  1278. X***************
  1279. X*** 418,423 ****
  1280. X--- 473,492 ----
  1281. X          case PM_ARCHEOLOGIST:
  1282. X  kludge("%s describes a recent article in \"Spelunker Today\" magazine.", Monnam(mtmp));
  1283. X              break;
  1284. X+         case PM_QUANTUM_MECHANIC:
  1285. X+             /* a trademark line for other Quantum Leap cultists -3. */
  1286. X+             if (mtmp->mnamelth && strcmp(NAME(mtmp), "Sam") == 0)
  1287. X+             verbalize("Oh, boy.");
  1288. X+             else {
  1289. X+             const char *Qman;
  1290. X+ 
  1291. X+             do Qman = Qmen[rn2(SIZE(Qmen))];
  1292. X+             while (mtmp->mnamelth && strcmp(NAME(mtmp), Qman) == 0);
  1293. X+ 
  1294. X+             kludge("%s asks if you've seen %s anywhere around.", 
  1295. X+                 Monnam(mtmp), Qman);
  1296. X+             }            
  1297. X+             break;
  1298. X          default:
  1299. X              kludge("%s discusses dungeon exploration.", Monnam(mtmp));
  1300. X          }
  1301. X***************
  1302. X*** 481,492 ****
  1303. X          (void) demon_talk(mtmp);
  1304. X          break;
  1305. X          }
  1306. X  # endif
  1307. X-     case MS_JEER:
  1308. X-         kludge("%s jeers at you.", Monnam(mtmp));
  1309. X-         break;
  1310. X      case MS_CUSS:
  1311. X!         cuss(mtmp);
  1312. X          break;
  1313. X      case MS_GUARD:
  1314. X          if (u.ugold)
  1315. X--- 550,560 ----
  1316. X          (void) demon_talk(mtmp);
  1317. X          break;
  1318. X          }
  1319. X+         /* fall through */
  1320. X  # endif
  1321. X      case MS_CUSS:
  1322. X!         if (!mtmp->mpeaceful && !mtmp->mtame)
  1323. X!         cuss(mtmp);
  1324. X          break;
  1325. X      case MS_GUARD:
  1326. X          if (u.ugold)
  1327. X***************
  1328. X*** 596,602 ****
  1329. X      pline("I see nobody there.");
  1330. X      return(0);
  1331. X      }
  1332. X!     if (mtmp->mfroz || mtmp->msleep) {
  1333. X      kludge("%s seems not to notice you.", Monnam(mtmp));
  1334. X      return 0;
  1335. X      }
  1336. X--- 664,670 ----
  1337. X      pline("I see nobody there.");
  1338. X      return(0);
  1339. X      }
  1340. X!     if (!mtmp->mcanmove || mtmp->msleep) {
  1341. X      kludge("%s seems not to notice you.", Monnam(mtmp));
  1342. X      return 0;
  1343. X      }
  1344. X***************
  1345. X*** 603,605 ****
  1346. X--- 671,675 ----
  1347. X  
  1348. X      return domonnoise(mtmp);
  1349. X  }
  1350. X+ 
  1351. X+ #endif /* OVLB */
  1352. X*** src/Old/sp_lev.c    Mon Feb 19 19:00:38 1990
  1353. X--- src/sp_lev.c    Wed Feb  7 18:38:30 1990
  1354. X***************
  1355. X*** 14,20 ****
  1356. X  #ifdef STRONGHOLD
  1357. X  #include "sp_lev.h"
  1358. X  
  1359. X! #if defined(MSDOS) || defined(MACOS) && !defined(AMIGA)
  1360. X  # define RDMODE "rb"
  1361. X  #else
  1362. X  # define RDMODE "r"
  1363. X--- 14,20 ----
  1364. X  #ifdef STRONGHOLD
  1365. X  #include "sp_lev.h"
  1366. X  
  1367. X! #if defined(MACOS) || (defined(MSDOS) && !defined(AMIGA))
  1368. X  # define RDMODE "rb"
  1369. X  #else
  1370. X  # define RDMODE "r"
  1371. X***************
  1372. X*** 470,477 ****
  1373. X          get_location(&x, &y);
  1374. X  
  1375. X          typ = tmpaltar.align == -11 ? rn2(3) :
  1376. X!               tmpaltar.align < 0    ? ralign[-tmpaltar.align-1] :
  1377. X!                           tmpaltar.align;
  1378. X          if (tmpaltar.shrine)
  1379. X              typ |= A_SHRINE;
  1380. X  
  1381. X--- 470,477 ----
  1382. X          get_location(&x, &y);
  1383. X  
  1384. X          typ = tmpaltar.align == -11 ? rn2(3) :
  1385. X!               (tmpaltar.align < 0    ? ralign[-tmpaltar.align-1] :
  1386. X!                           tmpaltar.align);
  1387. X          if (tmpaltar.shrine)
  1388. X              typ |= A_SHRINE;
  1389. X  
  1390. X***************
  1391. X*** 570,576 ****
  1392. X  
  1393. X  boolean
  1394. X  load_special(name)
  1395. X! char *name;
  1396. X  {
  1397. X      FILE *fd;
  1398. X      boolean result;
  1399. X--- 570,576 ----
  1400. X  
  1401. X  boolean
  1402. X  load_special(name)
  1403. X! const char *name;
  1404. X  {
  1405. X      FILE *fd;
  1406. X      boolean result;
  1407. X*** src/Old/spell.c    Mon Feb 19 19:01:01 1990
  1408. X--- src/spell.c    Wed Feb  7 18:37:45 1990
  1409. X***************
  1410. X*** 45,63 ****
  1411. X          if (uarmg) {
  1412. X              if (uarmg->rustfree)
  1413. X              Your("gloves seem unaffected.");
  1414. X!             else if (uarmg->spe > -6) {
  1415. X              Your("gloves corrode!");
  1416. X              uarmg->spe--;
  1417. X              } else
  1418. X!             Your("gloves look quite corroded.");
  1419. X              break;
  1420. X          }
  1421. X          if(Poison_resistance) {
  1422. X              losestr(rn1(1,2));
  1423. X!             losehp(rnd(6), "contact poison");
  1424. X          } else {
  1425. X              losestr(rn1(4,3));
  1426. X!             losehp(rnd(10), "contact poison");
  1427. X          }
  1428. X          break;
  1429. X      case 6:
  1430. X--- 45,63 ----
  1431. X          if (uarmg) {
  1432. X              if (uarmg->rustfree)
  1433. X              Your("gloves seem unaffected.");
  1434. X!             else if (uarmg->spe > -2) {
  1435. X              Your("gloves corrode!");
  1436. X              uarmg->spe--;
  1437. X              } else
  1438. X!             Your("gloves %s quite corroded.",Blind ? "feel":"look");
  1439. X              break;
  1440. X          }
  1441. X          if(Poison_resistance) {
  1442. X              losestr(rn1(1,2));
  1443. X!             losehp(rnd(6), "contact-poisoned spellbook", KILLED_BY_AN);
  1444. X          } else {
  1445. X              losestr(rn1(4,3));
  1446. X!             losehp(rnd(10), "contact-poisoned spellbook", KILLED_BY_AN);
  1447. X          }
  1448. X          break;
  1449. X      case 6:
  1450. X***************
  1451. X*** 67,73 ****
  1452. X          } else {
  1453. X              pline("As you read the book, it explodes in your %s!",
  1454. X              body_part(FACE));
  1455. X!             losehp (2*rnd(10)+5, "exploding rune");
  1456. X          }
  1457. X          break;
  1458. X      default:
  1459. X--- 67,73 ----
  1460. X          } else {
  1461. X              pline("As you read the book, it explodes in your %s!",
  1462. X              body_part(FACE));
  1463. X!             losehp (2*rnd(10)+5, "exploding rune", KILLED_BY_AN);
  1464. X          }
  1465. X          break;
  1466. X      default:
  1467. X***************
  1468. X*** 316,322 ****
  1469. X  
  1470. X  #ifdef HARD
  1471. X      if (confused ||
  1472. X!         ((int)(ACURR(A_INT) + u.uluck) - 3 * spellev(spell)) < 0) {
  1473. X  
  1474. X          if (Hallucination)
  1475. X              pline("Far out... a light show!");
  1476. X--- 316,322 ----
  1477. X  
  1478. X  #ifdef HARD
  1479. X      if (confused ||
  1480. X!         ((int)(ACURR(A_INT) + Luck) - 3 * spellev(spell)) < 0) {
  1481. X  
  1482. X          if (Hallucination)
  1483. X              pline("Far out... a light show!");
  1484. X***************
  1485. X*** 353,359 ****
  1486. X              else (void) getdir(1);
  1487. X              if(!u.dx && !u.dy && !u.dz) {
  1488. X                  if((damage = zapyourself(pseudo)))
  1489. X!                 losehp(damage, "self-inflicted injury");
  1490. X              } else    weffects(pseudo);
  1491. X          } else weffects(pseudo);
  1492. X          break;
  1493. X--- 353,361 ----
  1494. X              else (void) getdir(1);
  1495. X              if(!u.dx && !u.dy && !u.dz) {
  1496. X                  if((damage = zapyourself(pseudo)))
  1497. X!                 losehp(damage, 
  1498. X!         self_pronoun("zapped %sself with a spell", "him"),
  1499. X!                     NO_KILLER_PREFIX);
  1500. X              } else    weffects(pseudo);
  1501. X          } else weffects(pseudo);
  1502. X          break;
  1503. X***************
  1504. X*** 425,430 ****
  1505. X--- 427,433 ----
  1506. X  
  1507. X  static char
  1508. X  spellet(spl)
  1509. X+ int spl;
  1510. X  {
  1511. X      return (spl < 27) ? ('a' + spl - 1) : ('A' + spl - 27);
  1512. X  }
  1513. X*** src/Old/steal.c    Mon Feb 19 19:01:28 1990
  1514. X--- src/steal.c    Sat Feb 17 20:19:49 1990
  1515. X***************
  1516. X*** 4,10 ****
  1517. X  
  1518. X  #include "hack.h"
  1519. X  
  1520. X! static char *
  1521. X  equipname(otmp)
  1522. X  
  1523. X      register struct obj *otmp;
  1524. X--- 4,12 ----
  1525. X  
  1526. X  #include "hack.h"
  1527. X  
  1528. X! #ifdef OVLB
  1529. X! 
  1530. X! static const char *
  1531. X  equipname(otmp)
  1532. X  
  1533. X      register struct obj *otmp;
  1534. X***************
  1535. X*** 42,48 ****
  1536. X          freegold(gold);
  1537. X          if(Invisible) newsym(u.ux, u.uy);
  1538. X          pline("%s quickly snatches some gold from between your %s!",
  1539. X!             Monnam(mtmp), makeplural(body_part(FOOT)));
  1540. X          if(!u.ugold || !rn2(5)) {
  1541. X              rloc(mtmp);
  1542. X              mtmp->mflee = 1;
  1543. X--- 44,50 ----
  1544. X          freegold(gold);
  1545. X          if(Invisible) newsym(u.ux, u.uy);
  1546. X          pline("%s quickly snatches some gold from between your %s!",
  1547. X!             Blind ? "It" : Monnam(mtmp), makeplural(body_part(FOOT)));
  1548. X          if(!u.ugold || !rn2(5)) {
  1549. X              rloc(mtmp);
  1550. X              mtmp->mflee = 1;
  1551. X***************
  1552. X*** 74,80 ****
  1553. X          for(mtmp = fmon; mtmp; mtmp = mtmp->nmon)
  1554. X            if(mtmp->m_id == stealmid) {
  1555. X            freeinv(otmp);
  1556. X!           pline("%s steals %s!", Monnam(mtmp), doname(otmp));
  1557. X            mpickobj(mtmp,otmp);
  1558. X            mtmp->mflee = 1;
  1559. X            rloc(mtmp);
  1560. X--- 76,82 ----
  1561. X          for(mtmp = fmon; mtmp; mtmp = mtmp->nmon)
  1562. X            if(mtmp->m_id == stealmid) {
  1563. X            freeinv(otmp);
  1564. X!           pline("%s steals %s!", Blind ? "It" : Monnam(mtmp), doname(otmp));
  1565. X            mpickobj(mtmp,otmp);
  1566. X            mtmp->mflee = 1;
  1567. X            rloc(mtmp);
  1568. X***************
  1569. X*** 158,186 ****
  1570. X              break;
  1571. X          case ARMOR_SYM:
  1572. X              /* Stop putting on armor which has been stolen. */
  1573. X!             if (donning(otmp))
  1574. X!                 afternmv = 0;
  1575. X!             if(multi < 0 || otmp == uarms){
  1576. X                if (otmp == uarm)  (void) Armor_off();
  1577. X!               else if (otmp == uarmc) (void) Cloak_off();
  1578. X                else if (otmp == uarmf) (void) Boots_off();
  1579. X                else if (otmp == uarmg) (void) Gloves_off();
  1580. X                else if (otmp == uarmh) (void) Helmet_off();
  1581. X!               else if (otmp == uarms) (void) Shield_off();
  1582. X                else setworn((struct obj *)0, otmp->owornmask & W_ARMOR);
  1583. X                break;
  1584. X              }
  1585. X!         { int curssv = otmp->cursed;
  1586. X              otmp->cursed = 0;
  1587. X              stop_occupation();
  1588. X              if(flags.female)
  1589. X                  pline("%s charms you.  You gladly %s your %s.",
  1590. X!                   Monnam(mtmp),
  1591. X                    curssv ? "let her take" : "hand over",
  1592. X                    equipname(otmp));
  1593. X              else
  1594. X                  pline("%s seduces you and %s off your %s.",
  1595. X!                   Amonnam(mtmp, Blind ? "gentle" : "beautiful"),
  1596. X                    curssv ? "helps you to take" : "you start taking",
  1597. X                    equipname(otmp));
  1598. X              named++;
  1599. X--- 160,187 ----
  1600. X              break;
  1601. X          case ARMOR_SYM:
  1602. X              /* Stop putting on armor which has been stolen. */
  1603. X!             if (donning(otmp)) {
  1604. X!               cancel_don();
  1605. X                if (otmp == uarm)  (void) Armor_off();
  1606. X!               /* else if (otmp == uarmc) (void) Cloak_off(); */
  1607. X                else if (otmp == uarmf) (void) Boots_off();
  1608. X                else if (otmp == uarmg) (void) Gloves_off();
  1609. X                else if (otmp == uarmh) (void) Helmet_off();
  1610. X!               /* else if (otmp == uarms) (void) Shield_off(); */
  1611. X                else setworn((struct obj *)0, otmp->owornmask & W_ARMOR);
  1612. X                break;
  1613. X              }
  1614. X!             { int curssv = otmp->cursed;
  1615. X              otmp->cursed = 0;
  1616. X              stop_occupation();
  1617. X              if(flags.female)
  1618. X                  pline("%s charms you.  You gladly %s your %s.",
  1619. X!                   Blind ? "She" : Monnam(mtmp),
  1620. X                    curssv ? "let her take" : "hand over",
  1621. X                    equipname(otmp));
  1622. X              else
  1623. X                  pline("%s seduces you and %s off your %s.",
  1624. X!                   Blind ? "It" : Amonnam(mtmp, "beautiful"),
  1625. X                    curssv ? "helps you to take" : "you start taking",
  1626. X                    equipname(otmp));
  1627. X              named++;
  1628. X***************
  1629. X*** 207,213 ****
  1630. X                  return(0);
  1631. X              }
  1632. X              break;
  1633. X!         }
  1634. X          default:
  1635. X              impossible("Tried to steal a strange worn thing.");
  1636. X          }
  1637. X--- 208,214 ----
  1638. X                  return(0);
  1639. X              }
  1640. X              break;
  1641. X!             }
  1642. X          default:
  1643. X              impossible("Tried to steal a strange worn thing.");
  1644. X          }
  1645. X***************
  1646. X*** 217,227 ****
  1647. X      if(otmp == uball) unpunish();
  1648. X  
  1649. X      freeinv(otmp);
  1650. X!     pline("%s stole %s.", named ? "She" : Monnam(mtmp), doname(otmp));
  1651. X      mpickobj(mtmp,otmp);
  1652. X      if (otmp->otyp == CORPSE && otmp->corpsenm == PM_COCKATRICE
  1653. X          && !resists_ston(mtmp->data)) {
  1654. X!         pline("%s turns to stone.", Monnam(mtmp));
  1655. X          stoned = TRUE;
  1656. X          xkilled(mtmp, 0);
  1657. X          return -1;
  1658. X--- 218,228 ----
  1659. X      if(otmp == uball) unpunish();
  1660. X  
  1661. X      freeinv(otmp);
  1662. X!     pline("%s stole %s.", named ? "She" : (Blind ? "It" : Monnam(mtmp)), doname(otmp));
  1663. X      mpickobj(mtmp,otmp);
  1664. X      if (otmp->otyp == CORPSE && otmp->corpsenm == PM_COCKATRICE
  1665. X          && !resists_ston(mtmp->data)) {
  1666. X!         pline("%s turns to stone.", Blind ? "It" : Monnam(mtmp));
  1667. X          stoned = TRUE;
  1668. X          xkilled(mtmp, 0);
  1669. X          return -1;
  1670. X***************
  1671. X*** 229,234 ****
  1672. X--- 230,238 ----
  1673. X      return((multi < 0) ? 0 : 1);
  1674. X  }
  1675. X  
  1676. X+ #endif /* OVLB */
  1677. X+ #ifdef OVL1
  1678. X+ 
  1679. X  void
  1680. X  mpickobj(mtmp,otmp)
  1681. X  register struct monst *mtmp;
  1682. X***************
  1683. X*** 238,243 ****
  1684. X--- 242,250 ----
  1685. X      mtmp->minvent = otmp;
  1686. X  }
  1687. X  
  1688. X+ #endif /* OVL1 */
  1689. X+ #ifdef OVLB
  1690. X+ 
  1691. X  void
  1692. X  stealamulet(mtmp)
  1693. X  register struct monst *mtmp;
  1694. X***************
  1695. X*** 250,256 ****
  1696. X          setnotworn(otmp);
  1697. X          freeinv(otmp);
  1698. X          mpickobj(mtmp,otmp);
  1699. X!         pline("%s stole %s!", Monnam(mtmp), doname(otmp));
  1700. X          rloc(mtmp);
  1701. X          return;
  1702. X          }
  1703. X--- 257,263 ----
  1704. X          setnotworn(otmp);
  1705. X          freeinv(otmp);
  1706. X          mpickobj(mtmp,otmp);
  1707. X!         pline("%s stole %s!", Blind ? "It":Monnam(mtmp), doname(otmp));
  1708. X          rloc(mtmp);
  1709. X          return;
  1710. X          }
  1711. X***************
  1712. X*** 257,262 ****
  1713. X--- 264,272 ----
  1714. X      }
  1715. X  }
  1716. X  
  1717. X+ #endif /* OVLB */
  1718. X+ #ifdef OVL0
  1719. X+ 
  1720. X  /* release the objects the killed animal has stolen */
  1721. X  void
  1722. X  relobj(mtmp,show)
  1723. X***************
  1724. X*** 266,275 ****
  1725. X      register struct obj *otmp, *otmp2;
  1726. X  
  1727. X      for(otmp = mtmp->minvent; otmp; otmp = otmp2){
  1728. X-         place_object(otmp, mtmp->mx, mtmp->my);
  1729. X          otmp2 = otmp->nobj;
  1730. X-         otmp->nobj = fobj;
  1731. X          if (flooreffects(otmp,mtmp->mx,mtmp->my)) continue;
  1732. X          fobj = otmp;
  1733. X          stackobj(fobj);
  1734. X          if(show & cansee(mtmp->mx,mtmp->my))
  1735. X--- 276,285 ----
  1736. X      register struct obj *otmp, *otmp2;
  1737. X  
  1738. X      for(otmp = mtmp->minvent; otmp; otmp = otmp2){
  1739. X          otmp2 = otmp->nobj;
  1740. X          if (flooreffects(otmp,mtmp->mx,mtmp->my)) continue;
  1741. X+         place_object(otmp, mtmp->mx, mtmp->my);
  1742. X+         otmp->nobj = fobj;
  1743. X          fobj = otmp;
  1744. X          stackobj(fobj);
  1745. X          if(show & cansee(mtmp->mx,mtmp->my))
  1746. X***************
  1747. X*** 285,287 ****
  1748. X--- 295,299 ----
  1749. X              atl(mtmp->mx,mtmp->my, Hallucination ? rndobjsym() : GOLD_SYM);
  1750. X      }
  1751. X  }
  1752. X+ 
  1753. X+ #endif /* OVL0 */
  1754. X*** src/Old/termcap.c    Mon Feb 19 19:01:50 1990
  1755. X--- src/termcap.c    Fri Feb 16 22:11:10 1990
  1756. X***************
  1757. X*** 2,9 ****
  1758. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1759. X  /* NetHack may be freely redistributed.  See license for details. */
  1760. X  
  1761. X  /* block some unused #defines to avoid overloading some cpp's */
  1762. X- #define MONATTK_H
  1763. X  #include "hack.h"    /* for ROWNO, COLNO, *HI, *HE, *AS, *AE */
  1764. X  
  1765. X  #include <ctype.h>    /* for isdigit() */
  1766. X--- 2,9 ----
  1767. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1768. X  /* NetHack may be freely redistributed.  See license for details. */
  1769. X  
  1770. X+ #define MONATTK_H    /* comment line for pre-compiled headers */
  1771. X  /* block some unused #defines to avoid overloading some cpp's */
  1772. X  #include "hack.h"    /* for ROWNO, COLNO, *HI, *HE, *AS, *AE */
  1773. X  
  1774. X  #include <ctype.h>    /* for isdigit() */
  1775. X***************
  1776. X*** 10,16 ****
  1777. X  
  1778. X  #include "termcap.h"
  1779. X  
  1780. X! #if !defined(SYSV) || defined(TOS) || defined(UNIXPC)
  1781. X  # ifndef LINT
  1782. X  extern            /* it is defined in libtermlib (libtermcap) */
  1783. X  # endif
  1784. X--- 10,16 ----
  1785. X  
  1786. X  #include "termcap.h"
  1787. X  
  1788. X! #if (!defined(SYSV) && !defined(HPUX)) || defined(TOS) || defined(UNIXPC)
  1789. X  # ifndef LINT
  1790. X  extern            /* it is defined in libtermlib (libtermcap) */
  1791. X  # endif
  1792. X***************
  1793. X*** 20,26 ****
  1794. X  #endif
  1795. X  
  1796. X  #ifdef ASCIIGRAPH
  1797. X!   boolean IBMgraphics = FALSE;
  1798. X  #endif
  1799. X  
  1800. X  
  1801. X--- 20,32 ----
  1802. X  #endif
  1803. X  
  1804. X  #ifdef ASCIIGRAPH
  1805. X! 
  1806. X! #ifdef OVLB
  1807. X! 
  1808. X! boolean IBMgraphics = FALSE;
  1809. X! 
  1810. X! #endif /* OVLB */
  1811. X! 
  1812. X  #endif
  1813. X  
  1814. X  
  1815. X***************
  1816. X*** 30,60 ****
  1817. X  #define Tgetstr(key) (tgetstr(key,&tbufptr))
  1818. X  #endif /* MICROPORT_286_BUG **/
  1819. X  
  1820. X! static void nocmov();
  1821. X  #ifdef TEXTCOLOR
  1822. X  # ifdef TERMLIB
  1823. X! static void init_hilite();
  1824. X  # endif
  1825. X  #endif
  1826. X  
  1827. X! static char *HO, *CL, *CE, *UP, *CM, *ND, *XD, *BC, *SO, *SE, *TI, *TE;
  1828. X! static char *VS, *VE, *US, *UE;
  1829. X! static char *MR, *ME;
  1830. X  #if 0
  1831. X! static char *MB, *MH;
  1832. X! static char *MD;    /* may already be in use below */
  1833. X  #endif
  1834. X  #ifdef TERMLIB
  1835. X  # ifdef TEXTCOLOR
  1836. X! static char *MD;
  1837. X  # endif
  1838. X! static int SG;
  1839. X! static char PC = '\0';
  1840. X! static char tbuf[512];
  1841. X! #endif
  1842. X  
  1843. X  #ifndef TERMLIB
  1844. X! static char tgotobuf[20];
  1845. X  # ifdef TOS
  1846. X  #define tgoto(fmt, x, y)    (Sprintf(tgotobuf, fmt, y+' ', x+' '), tgotobuf)
  1847. X  # else
  1848. X--- 36,74 ----
  1849. X  #define Tgetstr(key) (tgetstr(key,&tbufptr))
  1850. X  #endif /* MICROPORT_286_BUG **/
  1851. X  
  1852. X! OSTATIC void FDECL(nocmov, (int, int));
  1853. X  #ifdef TEXTCOLOR
  1854. X  # ifdef TERMLIB
  1855. X! static void NDECL(init_hilite);
  1856. X  # endif
  1857. X  #endif
  1858. X  
  1859. X! VSTATIC char *HO, *CL, *CE, *UP, *CM, *ND, *XD, *BC, *SO, *SE, *TI, *TE;
  1860. X! VSTATIC char *VS, *VE, *US, *UE;
  1861. X! VSTATIC char *MR, *ME;
  1862. X  #if 0
  1863. X! VSTATIC char *MB, *MH;
  1864. X! VSTATIC char *MD;     /* may already be in use below */
  1865. X  #endif
  1866. X  #ifdef TERMLIB
  1867. X  # ifdef TEXTCOLOR
  1868. X! VSTATIC char *MD;
  1869. X  # endif
  1870. X! VSTATIC int SG;
  1871. X! #ifdef OVLB
  1872. X! XSTATIC char PC = '\0';
  1873. X! #else /* OVLB */
  1874. X! OSTATIC char PC;
  1875. X! #endif /* OVLB */
  1876. X! VSTATIC char tbuf[512];
  1877. X! #endif
  1878. X! 
  1879. X! #ifdef OVLB
  1880. X! static char nullstr[] = "";
  1881. X! #endif /* OVLB */
  1882. X  
  1883. X  #ifndef TERMLIB
  1884. X! VSTATIC char tgotobuf[20];
  1885. X  # ifdef TOS
  1886. X  #define tgoto(fmt, x, y)    (Sprintf(tgotobuf, fmt, y+' ', x+' '), tgotobuf)
  1887. X  # else
  1888. X***************
  1889. X*** 62,72 ****
  1890. X  # endif
  1891. X  #endif /* TERMLIB */
  1892. X  
  1893. X  void
  1894. X  startup()
  1895. X  {
  1896. X  #ifdef TERMLIB
  1897. X!     register char *term;
  1898. X      register char *tptr;
  1899. X      char *tbufptr, *pc;
  1900. X  #endif
  1901. X--- 76,88 ----
  1902. X  # endif
  1903. X  #endif /* TERMLIB */
  1904. X  
  1905. X+ #ifdef OVLB
  1906. X+ 
  1907. X  void
  1908. X  startup()
  1909. X  {
  1910. X  #ifdef TERMLIB
  1911. X!     register const char *term;
  1912. X      register char *tptr;
  1913. X      char *tbufptr, *pc;
  1914. X  #endif
  1915. X***************
  1916. X*** 122,127 ****
  1917. X--- 138,145 ----
  1918. X          showsyms[S_room] = 0xfa;    /* meta-z, centered dot */
  1919. X          showsyms[S_ndoor] = 0xfa;
  1920. X          showsyms[S_pool] = 0xf7;    /* meta-w, approx. equals */
  1921. X+         showsyms[S_hodoor] = 0xfe;    /* meta-~, small centered square */
  1922. X+         showsyms[S_vodoor] = 0xfe;
  1923. X      }
  1924. X  #endif /* ASCIIGRAPH */
  1925. X  
  1926. X***************
  1927. X*** 328,339 ****
  1928. X      US = Tgetstr("us");
  1929. X      UE = Tgetstr("ue");
  1930. X      SG = tgetnum("sg");    /* -1: not fnd; else # of spaces left by so */
  1931. X!     if(!SO || !SE || (SG > 0)) SO = SE = US = UE = "";
  1932. X      TI = Tgetstr("ti");
  1933. X      TE = Tgetstr("te");
  1934. X!     VS = VE = "";
  1935. X  # ifdef TERMINFO
  1936. X!     VS = Tgetstr("enacs");    /* graphics start */
  1937. X  # endif
  1938. X  # if 0
  1939. X      MB = Tgetstr("mb");    /* blink */
  1940. X--- 346,357 ----
  1941. X      US = Tgetstr("us");
  1942. X      UE = Tgetstr("ue");
  1943. X      SG = tgetnum("sg");    /* -1: not fnd; else # of spaces left by so */
  1944. X!     if(!SO || !SE || (SG > 0)) SO = SE = US = UE = nullstr;
  1945. X      TI = Tgetstr("ti");
  1946. X      TE = Tgetstr("te");
  1947. X!     VS = VE = nullstr;
  1948. X  # ifdef TERMINFO
  1949. X!     VS = Tgetstr("eA");    /* enable graphics */
  1950. X  # endif
  1951. X  # if 0
  1952. X      MB = Tgetstr("mb");    /* blink */
  1953. X***************
  1954. X*** 419,425 ****
  1955. X  register int x, y;    /* not xchar: perhaps xchar is unsigned and
  1956. X                 curx-x would be unsigned as well */
  1957. X  {
  1958. X- 
  1959. X      if (y == cury && x == curx)
  1960. X          return;
  1961. X      if(!ND && (curx != x || x <= 3)) {    /* Extremely primitive */
  1962. X--- 437,442 ----
  1963. X***************
  1964. X*** 438,445 ****
  1965. X          cmov(x, y);
  1966. X  }
  1967. X  
  1968. X! static void
  1969. X  nocmov(x, y)
  1970. X  {
  1971. X      if (cury > y) {
  1972. X          if(UP) {
  1973. X--- 455,466 ----
  1974. X          cmov(x, y);
  1975. X  }
  1976. X  
  1977. X! #endif /* OVLB */
  1978. X! #ifdef OVL0
  1979. X! 
  1980. X! XSTATIC void
  1981. X  nocmov(x, y)
  1982. X+ int x,y;
  1983. X  {
  1984. X      if (cury > y) {
  1985. X          if(UP) {
  1986. X***************
  1987. X*** 510,516 ****
  1988. X  
  1989. X  void
  1990. X  xputs(s)
  1991. X! char *s;
  1992. X  {
  1993. X  #ifndef MACOS
  1994. X  # ifndef TERMLIB
  1995. X--- 531,537 ----
  1996. X  
  1997. X  void
  1998. X  xputs(s)
  1999. X! const char *s;
  2000. X  {
  2001. X  #ifndef MACOS
  2002. X  # ifndef TERMLIB
  2003. X***************
  2004. X*** 544,549 ****
  2005. X--- 565,573 ----
  2006. X      }
  2007. X  }
  2008. X  
  2009. X+ #endif /* OVL0 */
  2010. X+ #ifdef OVLB
  2011. X+ 
  2012. X  void
  2013. X  clear_screen() {
  2014. X      xputs(CL);
  2015. X***************
  2016. X*** 550,555 ****
  2017. X--- 574,582 ----
  2018. X      home();
  2019. X  }
  2020. X  
  2021. X+ #endif /* OVLB */
  2022. X+ #ifdef OVL0
  2023. X+ 
  2024. X  void
  2025. X  home()
  2026. X  {
  2027. X***************
  2028. X*** 633,638 ****
  2029. X--- 660,668 ----
  2030. X  }
  2031. X  #endif
  2032. X  
  2033. X+ #endif /* OVL0 */
  2034. X+ #ifdef OVL1
  2035. X+ 
  2036. X  #if !defined(MSDOS) && !defined(MACOS)
  2037. X  # ifdef VMS
  2038. X  static const short tmspc10[] = {        /* from termcap */
  2039. X***************
  2040. X*** 668,674 ****
  2041. X--- 698,708 ----
  2042. X          tputs("$<50>", 1, xputc);
  2043. X  #  endif
  2044. X  # else
  2045. X+ #  ifdef __STDC__
  2046. X+         tputs("50", 1, (int (*)())xputc);
  2047. X+ #  else
  2048. X          tputs("50", 1, xputc);
  2049. X+ #  endif
  2050. X  # endif
  2051. X  
  2052. X      else if(ospeed > 0 && ospeed < SIZE(tmspc10)) if(CM) {
  2053. X***************
  2054. X*** 684,689 ****
  2055. X--- 718,726 ----
  2056. X  #endif /* MSDOS || MACOS */
  2057. X  }
  2058. X  
  2059. X+ #endif /* OVL1 */
  2060. X+ #ifdef OVLB
  2061. X+ 
  2062. X  void
  2063. X  cl_eos()            /* free after Robert Viduya */
  2064. X  {                /* must only be called with curx = 1 */
  2065. X***************
  2066. X*** 762,781 ****
  2067. X  static void
  2068. X  init_hilite()
  2069. X  {
  2070. X      int backg = BLACK, foreg = WHITE, len;
  2071. X      register int c, color;
  2072. X  
  2073. X      for (c = 0; c < SIZE(hilites); c++)
  2074. X          hilites[c] = HI;
  2075. X  
  2076. X  #  ifdef TOS
  2077. X!     hilites[RED] = hilites[BRIGHT+RED] = "\033b1";
  2078. X!     hilites[BLUE] = hilites[BRIGHT+BLUE] = "\033b2";
  2079. X!     hilites[CYAN] = hilites[BRIGHT+CYAN] = "\033b3\033c2";
  2080. X!     hilites[ORANGE_COLORED] = hilites[RED];
  2081. X!     hilites[WHITE] = hilites[GRAY] = "\033b3";
  2082. X!     hilites[MAGENTA] = hilites[BRIGHT+MAGENTA] = "\033b1\033c2";
  2083. X!     HE = "\033q\033b3\033c0";    /* to turn off the color stuff too */
  2084. X  #  else /* TOS */
  2085. X      /* find the background color, HI[len] == 'm' */
  2086. X      len = strlen(HI) - 1;
  2087. X--- 799,827 ----
  2088. X  static void
  2089. X  init_hilite()
  2090. X  {
  2091. X+ #  ifdef TOS
  2092. X+     int c;
  2093. X+     static char unhilite[] = "\033q\033b3\033c0";
  2094. X+ #  else
  2095. X      int backg = BLACK, foreg = WHITE, len;
  2096. X      register int c, color;
  2097. X+ #  endif
  2098. X  
  2099. X      for (c = 0; c < SIZE(hilites); c++)
  2100. X          hilites[c] = HI;
  2101. X  
  2102. X  #  ifdef TOS
  2103. X!     hilites[BROWN] = "\033b0\033c1";
  2104. X!     hilites[RED] = "\033b1";
  2105. X!     hilites[MAGENTA] = hilites[MAGENTA|BRIGHT] = "\033b1\033c2";
  2106. X!     hilites[CYAN] = hilites[CYAN|BRIGHT] = "\033b3\033c2";
  2107. X!     hilites[BLUE] = hilites[BLUE|BRIGHT] = "\033b2";
  2108. X!     hilites[GREEN] = hilites[GREEN|BRIGHT] = "\033b2\033c3";
  2109. X!     hilites[GRAY] = "\033b3\033c0";
  2110. X!     hilites[ORANGE_COLORED] = "\033b3\033c1";
  2111. X!     hilites[YELLOW] = "\033b1\033c3";
  2112. X!     hilites[WHITE] = "\033b0\033c3";
  2113. X!     HE = unhilite;    /* to turn off the color stuff too */
  2114. X  #  else /* TOS */
  2115. X      /* find the background color, HI[len] == 'm' */
  2116. X      len = strlen(HI) - 1;
  2117. X***************
  2118. X*** 817,819 ****
  2119. X--- 863,867 ----
  2120. X  }
  2121. X  # endif /* UNIX */
  2122. X  #endif /* TEXTCOLOR */
  2123. X+ 
  2124. X+ #endif /* OVLB */
  2125. X
  2126. END_OF_FILE
  2127. if test 55436 -ne `wc -c <'patch7.08'`; then
  2128.     echo shar: \"'patch7.08'\" unpacked with wrong size!
  2129. fi
  2130. # end of 'patch7.08'
  2131. echo shar: End of archive 11 \(of 30\).
  2132. cp /dev/null ark11isdone
  2133. MISSING=""
  2134. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 ; do
  2135.     if test ! -f ark${I}isdone ; then
  2136.     MISSING="${MISSING} ${I}"
  2137.     fi
  2138. done
  2139. if test "${MISSING}" = "" ; then
  2140.     echo You have unpacked all 30 archives.
  2141.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2142. else
  2143.     echo You still need to unpack the following archives:
  2144.     echo "        " ${MISSING}
  2145. fi
  2146. ##  End of shell archive.
  2147. exit 0
  2148.